import request from '@/utils/request'

//体验上传
//查询全部
export const listTOrder = (search) =>
    request({
        url: '/tOrder/tOrderAll',
        method: 'get',
        params: {
            offset: search.offset,
            limit: search.limit,
            value: search.name
        }
    })

export const list = (search) =>
    request({
        url: '/tOrder/tOrderList',
        method: 'get',
        params: {
            offset: search.offset,
            limit: search.limit,
            value:search.name
        }
    })

//修改前查询
export const getTOrderById = (id) =>
    request({
        url: '/tOrder/tOrderKey/' + id,
        method: 'get'
    })

//添加
export const saveTOrder = (rReporttoupload) =>
    request({
        url: '/tOrder/addtOrder',
        method: 'post',
        data: rReporttoupload
    })

//更新路由
export const updateTOrder = (rReporttoupload) =>
    request({
        url: '/tOrder/updateTOrder',
        method: 'put',
        data: rReporttoupload
    })

export const updateTOrderA = (rReporttoupload) =>
    request({
        url: '/tOrder/updateTOrderA',
        method: 'put',
        data: rReporttoupload
    })

//删除路由
export const removeTOrder = (id) =>
    request({
        url: '/tOrder/removeTOrder/' + id,
        method: 'delete',
    })

export const listSelectTOrder = (search) =>
    request({
        url: '/tOrder/tOrderSelect',
        method: 'get',
        params: {
            offset: search.offset,
            limit: search.limit,
            value: search.name
        }
    })
export const listSelectNoun = (search) =>
    request({
        url: '/tOrder/tOrderNoun',
        method: 'get',
        params: {
            offset: search.offset,
            limit: search.limit,
            value: search.value,
            startTime: search.startTime,
            endTime: search.endTime,
        }
    })
export const listtOrderMemberNoun = (search) =>
    request({
        url: '/tOrder/tOrderMemberNoun',
        method: 'get',
        params: {
            offset: search.offset,
            limit: search.limit,
            value: search.value,
            startTime: search.startTime,
            endTime: search.endTime,
        }
    })

export const getById = (id) =>
    request({
        url: '/tOrder/tOrderKeyId/' + id,
        method: 'get'
    })
